<template>
  <div>
    <h1>
      <router-link to="/detail"><span>点我有好看的</span></router-link>
    </h1>
    <ul>
      <li v-for="(values,index) in data_list" :key="values.id">{{ values.name }}</li>
    </ul>
    <div style="width: 360px;margin: 0 auto"><img src="static/image/69.png" alt="图片" style="width: 100%;"></div>
  </div>
</template>

<script>
export default {
  name: "Home",
  data() {
    return {
      data_list: [],
    }
  }, methods: {
    get_data_list() {
      // this.$axios.get(`${this.$settings.host}/t1/`)
      this.$axios.get(`${this.$settings.host}/api/home/`)
        .then((res) => {
          // console.log(res.data.data)
          this.data_list = res.data.data
        })
        .catch((error) => {

        })
    },
  },
  created() {
    this.get_data_list();
  }
}
</script>

<style scoped>
li {
  list-style: none;
}
</style>
